/*  1:   */ package org.jetbrains.jps.model.module.impl;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsModel;
import org.jetbrains.jps.model.impl.JpsNamedElementReferenceImpl;
import org.jetbrains.jps.model.impl.JpsProjectElementReference;
import org.jetbrains.jps.model.module.JpsModule;
import org.jetbrains.jps.model.module.JpsModuleReference;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */ 
/* 10:   */ public class JpsModuleReferenceImpl
/* 11:   */   extends JpsNamedElementReferenceImpl<JpsModule, JpsModuleReferenceImpl>
/* 12:   */   implements JpsModuleReference
/* 13:   */ {
/* 14:   */   public JpsModuleReferenceImpl(String paramString)
/* 15:   */   {
/* 16:30 */     super(JpsModuleRole.MODULE_COLLECTION_ROLE, paramString, new JpsProjectElementReference());
/* 17:   */   }
/* 18:   */   
/* 19:   */   @NotNull
/* 20:   */   public JpsModuleReferenceImpl createCopy()
/* 21:   */   {
/* 22:36 */     void tmp11_8 = new JpsModuleReferenceImpl(this.myElementName);
/* 23:36 */     if (tmp11_8 == null) {
/* 24:36 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsModuleReferenceImpl", "createCopy" }));
/* 25:   */     }
/* 26:36 */     return tmp11_8;
/* 27:   */   }
/* 28:   */   
/* 29:   */   @NotNull
/* 30:   */   public String getModuleName()
/* 31:   */   {
/* 32:42 */     String tmp4_1 = this.myElementName;
/* 33:42 */     if (tmp4_1 == null) {
/* 34:42 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsModuleReferenceImpl", "getModuleName" }));
/* 35:   */     }
/* 36:42 */     return tmp4_1;
/* 37:   */   }
/* 38:   */   
/* 39:   */   public JpsModuleReference asExternal(@NotNull JpsModel paramJpsModel)
/* 40:   */   {
/* 41:47 */     if (paramJpsModel == null) {
/* 42:47 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/module/impl/JpsModuleReferenceImpl", "asExternal" }));
/* 43:   */     }
/* 44:47 */     paramJpsModel.registerExternalReference(this);
/* 45:48 */     return this;
/* 46:   */   }
/* 47:   */   
/* 48:   */   public String toString()
/* 49:   */   {
/* 50:53 */     return "module ref: '" + this.myElementName + "' in " + getParentReference();
/* 51:   */   }
/* 52:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.module.impl.JpsModuleReferenceImpl

 * JD-Core Version:    0.7.0.1

 */